class Solution {
public:
    void reverseString(vector<char>& s) {
        int left = 0, right = s.size()-1;
        for(; left < right; ++left,--right){
            /*
            char temp = s[left];
            s[left] = s[right];
            s[right] = temp;
            */
            s[left] ^= s[right];
            s[right] ^= s[left];
            s[left] ^= s[right];
        }

    }
};